<div class="grid_12">
    <?php if($msg != ''): ?>
    <ul class="error" style="color: red;padding-bottom:10px">
        <?php $msg = str_replace('.html', '', $msg)?>
        <li><?php echo $msg ?></li>
    </ul>
    <?php endif; ?>
    <a class="checker" style="padding:3px 6px;margin-bottom: 7px" href="<?php echo site_url('admin/network/add/') ?>">Thêm nhà mạng</a>
    <a class="checker" style="padding:3px 6px;margin-bottom: 7px" href="<?php echo site_url('admin/network/updateNetworkPrice/') ?>">Cập nhập giá mạng sim</a>
    <div class="searchWrap" style="margin-bottom: 5px;float:right">
        <input type="text" id="keyword" name="keyword" class="keyword" val="<?php echo $keyword ?>" placeholder="Nhập từ khóa tìm kiếm"/>
        <input type="button" id="search" value="Tìm kiếm" rel="<?php echo site_url('admin/network/index') ?>"/>
    </div>
    <div id="demo" class="clearfix">
        <table class="display" id="dataTable"> 
            <thead> 
                <tr> 
                    <th>Tên mạng</th> 
                    <th>Trạng thái</th> 
                    <th width="100">Tình trạng giá</th>
                    <th>Action</th> 
                </tr> 
            </thead>
            <tbody>
                <?php foreach($group as $g): ?>
                    <tr class="<?php echo ($g['delete_flag'] == 0) ? 'gradeA' : 'gradeX' ?>"> 
                        <td><?php echo $g['name'] ?></td> 
                        <td class="center">
                            <?php 
                                switch ($g['delete_flag']) {
                                    case 0 : 
                                        echo 'Hiển thị';
                                        break;
                                    case 1 :
                                        echo 'Ẩn';
                                        break;
                                }
                            ?>
                        </td> 
                        <td style="text-align: center">
                            <?php 
                                switch ($g['priceStatus']) {
                                    case '1' :
                                        echo 'Tăng giá';
                                        break;
                                    case '-1':
                                        echo 'Giảm giá';
                                        break;
                                    default:
                                        echo 'Bình thường';
                                        break;
                            }
                            ?>
                        </td>
                        <td class="center"><a href="<?php echo site_url('admin/network/edit/' . $g['id']) ?>"><img src ="<?php echo STATIC_DOMAIN?>/images/simsodep/edit.png" alt="edit" title="Sửa"></a> 
                            -
                            <?php if($g['delete_flag'] == 0): ?>
                            <a id="icon_hide" href="<?php echo site_url('admin/network/hide/'. $g['id']) ?>"><img src ="<?php echo STATIC_DOMAIN?>/images/simsodep/hide.png" width="18" height="18" alt="hide" title="Ẩn"></a>
                            <?php else: ?>
                            <a id="icon_show" href="<?php echo site_url('admin/network/show/'. $g['id']) ?>"><img src ="<?php echo STATIC_DOMAIN?>/images/simsodep/show.png" width="18" height="18" alt="hide" title="Hiện"></a> 
                            <?php endif; ?>
                            - 
                            <a class="delete" href="<?php echo site_url('admin/network/delete/'. $g['id']) ?>"><img src ="<?php echo STATIC_DOMAIN?>/images/simsodep/delete.png" alt="delete" title="Xóa"></a>
                        </td>
                    </tr>
                <?php endforeach; ?>
            </tbody>
        </table>
        <div class="pagination" style="margin-top: 5px">
                <?php echo $pagination ?>
            </div>
    </div>

</div>
